Php asynchronous: Using fsockopen curl in php to implement functions similar to asynchronous processing, fsockopencurl
From the mainstream perspective, PHP is a process-oriented language. The biggest drawback of PHP is that it cannot implement multi-
PHP from the mainstream, is a process-oriented language, its biggest drawback is the inability to achieve multithreaded management, the implementation of its programs are from beginning to end, according to the logic all the way down, impossible to
This article only as my learning process of a little experience, welcome everyone to shoot bricks.
PHP from the mainstream, is a process-oriented language, its biggest drawback is the inability to implement multi-threaded management, the execution
fsocketopen/curl/file_get_contents contrast
fsocketopen
is a lower-level call, a socket call that belongs to the network system
1, Fsockopen returns data that has not been processed, including the length of the
One, the problem descriptionGanglia the various components of the installation (not I installed, only know this information):The cluster has a total of 4 machines, namely 192.168.121.34-37. Gmetad, Gweb and httpd are installed on the 192.168.121.34
PHP itself is not timed function, PHP can not be multi-threaded. PHP's timing tasks must be combined with other tools to achieve, such as WordPress built-in Wp-cron features, very powerful.
First, the Linux server using crontab timed to execute PHP
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.